package com.atiguigu.springcloud.controller;

import com.atguigu.springcloud.entity.CommonResult;
import com.atguigu.springcloud.entity.Payment;
import com.atiguigu.springcloud.clients.PaymentClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author lizhilong
 * @create 2020/5/3 12:59
 * @desc
 */
@RestController
public class PaymentController {

    @Resource
    private PaymentClient paymentClient;

    @GetMapping("/consumer/payment/get/{id}")
    public CommonResult<Payment> get(@PathVariable("id") Integer id){
        CommonResult commonResult = paymentClient.get(id);
        return commonResult;
    }
}
